New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

session-cache

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

session-cache

Session storage for tasks.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.3K
decreased by-1.94%
Maintainers
2
Weekly downloads
 
Created
Source

session-cache NPM version Build Status

Session storage for tasks.

Install with npm

npm i session-cache --save

Running tests

Install dev dependencies.

npm i -d && npm test

Usage

Example of using sessions to pass data between gulp tasks.

var session = require('session-cache')('your app');

API

.createSession

Create a session with the given name

  • name {String}
  • returns: {Object}
var session = require('session')('your app');

.bind

Bind a function to the current Session context.

  • fn {Function}: Function to bind.
function fn (options, next) {
  next();
}
session.bind(fn);

.bindEmitter

Bind an EventEmitter or Stream to the current Session context.

  • emitter {EventEmitter|Stream}: EventEmitter or Stream to bind.
var stream = through.obj();
session.bindEmitter(stream);

.set

  • key {String}
  • value {*}
  • returns {*}: Returns the set value.

Assign value on the current session to key.

.get

  • key {String}
  • returns {*}: Value of the key or undefined

Get the stored value of key from the current session.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Brian Woodward

License

Copyright © 2015 Brian Woodward Released under the MIT license


This file was generated by verb-cli on August 25, 2015.

FAQs

Package last updated on 26 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc